# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=man-db
pkgver=2.9.3
pkgrel=1
pkgdesc="The man command and related utilities for examining on-line help files"
url="http://www.nongnu.org/man-db/"
arch="all"
license="GPL-2.0-or-later"
depends="groff less !mandoc !mandoc-apropos"
makedepends="gdbm-dev gettext-dev libpipeline-dev zlib-dev libseccomp-dev"
subpackages="$pkgname-lang $pkgname-doc"
source="http://download.savannah.nongnu.org/releases/man-db/man-db-$pkgver.tar.xz"
triggers="man-db.trigger=/usr/share/man"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-setuid \
		--with-sections="1 1p 1x 2 2x 3 3p 3x 4 4x 5 5x 6 6x 7 7x 8 8x 9 0p tcl n l p o" \
		--enable-nls \
		--with-db=gdbm \
		--with-systemdsystemunitdir=no \
		--with-systemdtmpfilesdir=no \
		--with-libseccomp
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ca1c1214753483f6e22efe69a9df9852e0de01a9ad3b9950dcbbc9f38e6060100b98a84333256f8c734002e66e2fd6256bc017a31bd9acfc42002dca2c0f879b  man-db-2.9.3.tar.xz"
